<html>
<head><meta charset="utf-8"><title>duplicate lint warning for span · t-compiler/wg-diagnostics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/index.html">t-compiler/wg-diagnostics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html">duplicate lint warning for span</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="147339498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/duplicate%20lint%20warning%20for%20span/near/147339498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html#147339498">(Nov 08 2018 at 23:57)</a>:</h4>
<p>can I check if a specific lint warning has already been made for a particular span?</p>



<a name="147339504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/duplicate%20lint%20warning%20for%20span/near/147339504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html#147339504">(Nov 08 2018 at 23:57)</a>:</h4>
<p>to avoid duplicate warnings when recursively linting patterns</p>



<a name="147359580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/duplicate%20lint%20warning%20for%20span/near/147359580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html#147359580">(Nov 09 2018 at 09:12)</a>:</h4>
<p>Isn't that happening automatically?</p>



<a name="147359621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/duplicate%20lint%20warning%20for%20span/near/147359621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html#147359621">(Nov 09 2018 at 09:12)</a>:</h4>
<p>we do have some deduplication cache, not sure how extensive its coverage is</p>



<a name="147361769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/duplicate%20lint%20warning%20for%20span/near/147361769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html#147361769">(Nov 09 2018 at 10:00)</a>:</h4>
<p>its not automatic. Or at least, we rolled our own in rustc_mir::borrow_check</p>



<a name="147361784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/duplicate%20lint%20warning%20for%20span/near/147361784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html#147361784">(Nov 09 2018 at 10:00)</a>:</h4>
<p>in that case, it was coupled with the desire to sort the diagnostics by span</p>



<a name="147750092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/duplicate%20lint%20warning%20for%20span/near/147750092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Esteban Küber <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/duplicate.20lint.20warning.20for.20span.html#147750092">(Nov 15 2018 at 15:34)</a>:</h4>
<blockquote>
<p>Isn't that happening automatically?</p>
</blockquote>
<p>I believe the only thing that happens automatically is to deduplicate the "defined here/<code>[deny(lint)]</code>" note</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>